package cn.sunxyz.struct.decorator;

import java.util.function.Function;

/**
 * Created by yangrd on 2017/5/12.
 */
public abstract class DirnkDecorator implements Drink {

    protected Drink drink;

    protected Function<Integer, Integer> formula = (i) -> i;

    public DirnkDecorator(Drink drink) {
        this.drink = drink;
    }

    public DirnkDecorator formula(Function<Integer, Integer> formula) {
        this.formula = formula;
        return this;
    }


}
